<template>
    <div>
        <van-nav-bar title="商品详情" />
        <van-swipe :autoplay="3000" lazy-render>
            <van-swipe-item v-for="image in images" :key="image">
                <img :src="image" style="width: 100%; height: 200px;" />
            </van-swipe-item>
        </van-swipe>
        <h4>白色 30000mAh YKMSO1824移动电源充电宝</h4>
        <van-card price="2.00">
            <template #footer>
                <van-button size="mini">选规格</van-button>
            </template>
        </van-card>
        <van-tabs v-model:active="active">
            <van-tab title="商品详情">商品详情</van-tab>
            <van-tab title="规格参数">规格参数</van-tab>
            <van-tab title="销售数据">销售数据</van-tab>
            <van-tab title="采购说明">采购说明</van-tab>
        </van-tabs>
        <van-swipe :autoplay="3000" lazy-render>
            <van-swipe-item v-for="image in images" :key="image">
                <img :src="image" style="width: 100%; height: 200px;" />
            </van-swipe-item>
        </van-swipe>
        <van-submit-bar :price="99000" button-text="去结算" @submit="onSubmit" />
    </div>

</template>

<script setup>
import { ref } from 'vue';
import { useRouter } from 'vue-router';
const router =useRouter()
    const onSubmit = () =>{
         router.push('/js')
    }
const images = [
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-9.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-8.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-7.jpeg',
    'https://fastly.jsdelivr.net/npm/@vant/assets/apple-6.jpeg',
];
const active = ref(1);
</script>

<style lang="scss" scoped></style>